package com.aratek.huwai.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @Author 姜寄羽
 * 节目评分
 * @Date 2018/1/26 15:21
 */
@Entity
@Table(name = "PROGRAM_SCORE")
public class ProgramScoreEntity {

    private Integer id;

    @NotNull(message = "请选择节目")
    private Integer programId;

    @NotNull
    @Min(value = 1,message = "评委编号必需大于等于1")
    @Max(value = 15,message = "评委编号必需小于15")
    private Integer raterId;

    @Min(value = 0,message = "分数必需大于等于0")
    @Max(value = 10,message = "分数必需小于等于10")
    private Integer score;

    @Id
    @Column(length = 30)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column
    public Integer getProgramId() {
        return programId;
    }

    public void setProgramId(Integer dishId) {
        this.programId = dishId;
    }

    @Column
    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Column
    public Integer getRaterId() {
        return raterId;
    }

    public void setRaterId(Integer raterTable) {
        this.raterId = raterTable;
    }
}
